package com.jisf.driver.mapper;

import com.jisf.driver.entity.po.UserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jisf.driver.entity.vo.RoleListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jisf
 * @since 2022-04-08
 */
public interface UserRoleMapper extends BaseMapper<UserRole> {

    List<RoleListVo> findRoleListVoByUserId(Integer userId);

    List<Integer> selectRolesByUserId(Integer userId);

    int deleteUserRoles(@Param("userId") Integer userId, @Param("rolesId") List<Integer> rolesId);

    int insertUserRoles(@Param("userId") Integer userId, @Param("rolesId") List<Integer> rolesId);

}
